package com.katydid.web;
import javax.faces.context.FacesContext;
import javax.faces.event.PhaseEvent;
import javax.faces.event.PhaseId;
import javax.faces.event.PhaseListener;


public class PhaseTracker implements PhaseListener {

	@Override
	public void afterPhase(PhaseEvent event) {
		
		System.out.println("After phase : " + event.getPhaseId());
		System.out.println("IsPostback? " + FacesContext.getCurrentInstance().isPostback());
	}

	@Override
	public void beforePhase(PhaseEvent event) {
		System.out.println("Before phase : " + event.getPhaseId());
		
	}

	@Override
	public PhaseId getPhaseId() {
		return PhaseId.ANY_PHASE;
	}

}
